package com.lai.dao;


import com.lai.pojo.Transaction;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface WalletMapper {
    void spendFromWallet(@Param("userId") int walletId, @Param("amount") BigDecimal amount);       //消费
    void refundToWallet(@Param("userId") int walletId, @Param("amount") BigDecimal amount);       //退款
    BigDecimal selectBalanceById(int walletId);        //查看余额
    void addTransaction(Transaction transaction);
    List<Transaction> selectTransaction(int userId);        //查询用户钱包金额变动明细的接口
}

